Optimal. Leaf size=197 \[ \frac {g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \, _2F_1\left (2,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )}{6 e (n+1) (e f-d g)^4}-\frac {g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{6 e (d+e x)^2 (e f-d g)^2}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {949, 78, 68} \[ \frac {g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \, _2F_1\left (2,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )}{6 e (n+1) (e f-d g)^4}-\frac {g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{6 e (d+e x)^2 (e f-d g)^2}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 68
Rule 78
Rule 949
Rubi steps
\begin {align*} \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\int \frac {(f+g x)^n \left (a g (2-n)-\frac {c d (3 e f-d g (1+n))}{e}-3 c (e f-d g) x\right )}{(d+e x)^3} \, dx}{3 (e f-d g)}\\ &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {\left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) \int \frac {(f+g x)^n}{(d+e x)^2} \, dx}{6 e (e f-d g)^2}\\ &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {g \left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) (f+g x)^{1+n} \, _2F_1\left (2,1+n;2+n;\frac {e (f+g x)}{e f-d g}\right )}{6 e (e f-d g)^4 (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 106, normalized size = 0.54 \[ \frac {g (f+g x)^{n+1} \left (g^2 \left (a e-c d^2\right ) \, _2F_1\left (4,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )+c (e f-d g)^2 \, _2F_1\left (2,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )\right )}{e (n+1) (e f-d g)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.05, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{e^{4} x^{4} + 4 \, d e^{3} x^{3} + 6 \, d^{2} e^{2} x^{2} + 4 \, d^{3} e x + d^{4}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.17, size = 0, normalized size = 0.00 \[ \int \frac {\left (c e \,x^{2}+2 c d x +a \right ) \left (g x +f \right )^{n}}{\left (e x +d \right )^{4}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (c e x^{2} + 2 \, c d x + a\right )} {\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (f+g\,x\right )}^n\,\left (c\,e\,x^2+2\,c\,d\,x+a\right )}{{\left (d+e\,x\right )}^4} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (f + g x\right )^{n} \left (a + 2 c d x + c e x^{2}\right )}{\left (d + e x\right )^{4}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________